home *** CD-ROM | disk | FTP | other *** search
/ Java Programmer's Toolkit / Java Programmer's Toolkit.iso / solaris2 / jdk / include / match.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-30  |  1.4 KB  |  56 lines

  1. /*
  2.  * @(#)match.h    1.4 95/01/31 James Gosling
  3.  *
  4.  * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved.
  5.  *
  6.  * Permission to use, copy, modify, and distribute this software
  7.  * and its documentation for NON-COMMERCIAL purposes and without
  8.  * fee is hereby granted provided that this copyright notice
  9.  * appears in all copies. Please refer to the file "copyright.html"
  10.  * for further important copyright and licensing information.
  11.  *
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  13.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  14.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  15.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  16.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  17.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  18.  */
  19.  
  20. /*
  21.  * Definitions having to do with pattern matching
  22.  */
  23.  
  24. #ifndef _MATCH_H_
  25. #define _MATCH_H_
  26.  
  27. #ifndef _TREE_
  28. #include <tree.h>
  29. #endif
  30.  
  31. struct template {
  32.     struct node *left, *right;
  33.     struct node *replacement;
  34.     struct template **backlink;
  35.     struct template *sameset;
  36.     struct template *next;
  37.     int flags;
  38.     char replaceafter;
  39. };
  40.  
  41. struct ruleset {
  42.     struct template *templates;
  43.     struct ruleset *prev;
  44. };
  45.  
  46. struct ruleset *thisruleset;
  47.  
  48. struct template *templates[N_OPS];
  49.  
  50. struct match_state {
  51.     int mask;
  52.     struct node *vars[10];
  53. };
  54.  
  55. #endif /* !_MATCH_H_ */
  56.